gtk4.git
14 years agoa11y: Re-implement gtk_tree_view_accessible_get_n_rows()
Benjamin Otte [Thu, 7 Jul 2011 07:54:04 +0000 (09:54 +0200)]
a11y: Re-implement gtk_tree_view_accessible_get_n_rows()

... using the new _gtk_rbtree_find_index().

14 years agotreeview: Add _gtk_rbtree_find_index()
Benjamin Otte [Thu, 7 Jul 2011 07:52:24 +0000 (09:52 +0200)]
treeview: Add _gtk_rbtree_find_index()

Uses the parity to do an O(log N) search for the nth element in the
tree in display order of the treeview.

14 years agotreeview: Rename "parity" to "total_count"
Benjamin Otte [Wed, 16 Nov 2011 03:14:00 +0000 (04:14 +0100)]
treeview: Rename "parity" to "total_count"

Now that we use it to actually count the rows instead of just even/odd,
it's better to reflect that in the variable name.

14 years agotreeview: Make the parity actually store the row number
Benjamin Otte [Thu, 7 Jul 2011 06:48:06 +0000 (08:48 +0200)]
treeview: Make the parity actually store the row number

Instead of just storing the least significant bit of the row number,
store the full row number. This will soon be useful for accessibility.
But CSS could like it, too.

14 years agotreeview: Remove special cases when computing parity
Benjamin Otte [Thu, 7 Jul 2011 06:47:25 +0000 (08:47 +0200)]
treeview: Remove special cases when computing parity

The parity of the nil npode is always 0, so no need to check for the nil
node first.

14 years agotreeview: Only compute parity once when rendering
Benjamin Otte [Thu, 7 Jul 2011 06:46:05 +0000 (08:46 +0200)]
treeview: Only compute parity once when rendering

This shouldn't affect performance too much, but it I just found it so I
fixed it.

14 years agoGtkSpinButton: Clarify clamping behavior in gtk_spin_button_set_range doc
Stef Walter [Mon, 14 Nov 2011 09:59:10 +0000 (10:59 +0100)]
GtkSpinButton: Clarify clamping behavior in gtk_spin_button_set_range doc

 * If the current value is outside the range, it will be adjusted
   to fit within the range, otherwise it will remain unchanged.

https://bugzilla.gnome.org/show_bug.cgi?id=664021

14 years agoAvoid double inclusion of a migration chapter
Matthias Clasen [Tue, 15 Nov 2011 05:47:16 +0000 (00:47 -0500)]
Avoid double inclusion of a migration chapter

14 years agoGtkTextViewAccessible: Respect display lines
Matthias Clasen [Tue, 15 Nov 2011 05:21:56 +0000 (00:21 -0500)]
GtkTextViewAccessible: Respect display lines

This special tweak was lost when porting from GailTextUtil.

https://bugzilla.gnome.org/show_bug.cgi?id=663994

14 years agoFix GDK linking for Gtk typelib and example builds
Martin Pitt [Mon, 14 Nov 2011 12:08:47 +0000 (13:08 +0100)]
Fix GDK linking for Gtk typelib and example builds

Add missing GDK linking to GIR build and examples:

  GISCAN Gtk-3.0.gir
  CCLD   gtk-query-immodules-3.0
./.libs/libgtk-3.so: undefined reference to `gdk_keymap_get_modifier_mask'
./.libs/libgtk-3.so: undefined reference to `gdk_modifier_intent_get_type'
./.libs/libgtk-3.so: undefined reference to `gdk_window_begin_resize_drag_for_device'
./.libs/libgtk-3.so: undefined reference to `gdk_event_triggers_context_menu'
collect2: ld returned 1 exit status

  CCLD   grid-packing
../gtk/.libs/libgtk-3.so: undefined reference to `gdk_keymap_get_modifier_mask'
[...]

https://bugzilla.gnome.org/show_bug.cgi?id=664027

14 years agoFixed Russian translation
Yuri Kozlov [Mon, 14 Nov 2011 19:49:47 +0000 (23:49 +0400)]
Fixed Russian translation

14 years agoGtkComboBoxAccessible: Make keybindings work
Matthias Clasen [Mon, 14 Nov 2011 14:23:14 +0000 (09:23 -0500)]
GtkComboBoxAccessible: Make keybindings work

https://bugzilla.gnome.org/show_bug.cgi?id=659151

14 years agoAdd combobox a11y tests
Matthias Clasen [Mon, 14 Nov 2011 14:23:01 +0000 (09:23 -0500)]
Add combobox a11y tests

14 years agoAdd some keybindings to the a11y entries test
Matthias Clasen [Mon, 14 Nov 2011 14:18:47 +0000 (09:18 -0500)]
Add some keybindings to the a11y entries test

14 years agoFix gtk_tree_view_get_tooltip_context() transfer annotation
Martin Pitt [Mon, 14 Nov 2011 13:32:32 +0000 (14:32 +0100)]
Fix gtk_tree_view_get_tooltip_context() transfer annotation

The default (out) transfer mode is "full", but the passed "model" pointer gets
set to gtk_tree_view_get_model() which is "transfer none". This caused Python
programs to free the model after calling this, causing crashes.

14 years agoAdd a link to the Windows port wiki page
Matthias Clasen [Mon, 14 Nov 2011 13:01:23 +0000 (08:01 -0500)]
Add a link to the Windows port wiki page

14 years agoFix uninitialized digest_len field, causing WebSocket handshake to g_assert.
C. Scott Ananian [Fri, 11 Nov 2011 21:26:12 +0000 (16:26 -0500)]
Fix uninitialized digest_len field, causing WebSocket handshake to g_assert.

g_checksum_get_digest checks to ensure that the passed digest_len is long
enough to hold the digest, before setting it to the actual length of the
digest returned.  Digest_len is uninitialized in the code, so if you're
lucky it will be larger than 20 and everything will work fine.  If you're
unlucky, g_checksum_get_digest will return either -1 or some number less
than 20, and the g_assert(digest_len==20) will fail.

14 years agoquartz: fix a race condition when waking up the CGRunLoop
Michael Natterer [Fri, 11 Nov 2011 22:49:21 +0000 (23:49 +0100)]
quartz: fix a race condition when waking up the CGRunLoop

Wake up the run loop unconditionally (don't check if it is waiting) because
it might go into waiting state right after we checked for it. Fixes GIMP
startup (which has a lot of GIOChannel I/O but zero NSEvents) from several
minutes to a few seconds.
(cherry picked from commit 0729cdc9a1e8003c41d3ebf20eecfe2d1b29ffbe)

14 years agoGtkProgressbar: respect the range of 'fraction'
Matthias Clasen [Fri, 11 Nov 2011 15:26:31 +0000 (10:26 -0500)]
GtkProgressbar: respect the range of 'fraction'

The setter should not set the property to values outside the allowed
range.

https://bugzilla.gnome.org/show_bug.cgi?id=663825

14 years agoFix some implicit declaration warnings
Rico Tzschichholz [Fri, 11 Nov 2011 12:06:56 +0000 (13:06 +0100)]
Fix some implicit declaration warnings

There were some includes of gtkmain.h missing

14 years agowin32: Make grab cursors work again
Alexander Larsson [Thu, 10 Nov 2011 20:32:50 +0000 (21:32 +0100)]
win32: Make grab cursors work again

14 years agowin32: Fix gdk_win32_window_translate
Alexander Larsson [Thu, 10 Nov 2011 15:51:07 +0000 (16:51 +0100)]
win32: Fix gdk_win32_window_translate

We now do proper handling of existing invalid regions, and
we use ScrollDC which allows us to specify the right clip
region rather than just the bounding rect.

14 years agowin32: fix pasting screenshots taken with PrintScreen or Alt+PrintScreen
Dieter Verfaillie [Fri, 4 Nov 2011 08:44:35 +0000 (09:44 +0100)]
win32: fix pasting screenshots taken with PrintScreen or Alt+PrintScreen

These are found on the clipboard in the biCompression == BI_BITFIELDS &&
biBitCount >= 16 format. In this case the BITMAPINFOHEADER is followed
by three DWORD specifying the masks of the red green and blue components,
but bfOffBits was not being adjusted accordingly.

Based on Massimo's comment on bug 631384 and verified on
http://msdn.microsoft.com/en-us/library/dd183386%28v=VS.85%29.aspx

https://bugzilla.gnome.org/show_bug.cgi?id=631384

14 years agowin32: fix some typos
Dieter Verfaillie [Fri, 4 Nov 2011 06:41:55 +0000 (07:41 +0100)]
win32: fix some typos

14 years agowin32: Fix some warnings
Alexander Larsson [Wed, 2 Nov 2011 15:49:55 +0000 (16:49 +0100)]
win32: Fix some warnings

14 years agowin32: Hack to make statusbar menus show up visible:
Alexander Larsson [Wed, 2 Nov 2011 15:11:54 +0000 (16:11 +0100)]
win32: Hack to make statusbar menus show up visible:

14 years agowin32: Ensure newly mapped toplevels are inside the workarea
Alexander Larsson [Wed, 2 Nov 2011 13:30:23 +0000 (14:30 +0100)]
win32: Ensure newly mapped toplevels are inside the workarea

This is what e.g. metacity does, and its needed to e.g. get the inital
position of the gimp dock window right.

14 years agowin32: Fix placement at initial position
Alexander Larsson [Wed, 2 Nov 2011 11:15:53 +0000 (12:15 +0100)]
win32: Fix placement at initial position

Positioning windows at 0,0 post creation failed, because it
was mapped with CW_USEDFAULT, but private->x/y still said 0,
so moving it to 0,0 did nothing. We now always position the
window at the right place, even when not mapped, but we
create it at CW_USEDEFAULT initially and store that position
before moving it to the right place.

This fixes the window sizing test in testgtk and the inital
position for the gimp toolbar.

14 years agowin32: Fix synaptics trackpad issues
Alexander Larsson [Tue, 1 Nov 2011 21:25:26 +0000 (22:25 +0100)]
win32: Fix synaptics trackpad issues

The synaptics trackpad driver has some weird behaviour on scroll.
It pops up a window over the mouse pointer (looking like a scrollbar).
This has two problems:
* We get extra enter/leave events for the trackpad window
* We get back the trackpad window when we look for the window
  under the mouse to deliver the mousewheel message.

So, we add some trackpad specific hacks to avoid this (sigh) based
on the trackpad window window class.

This fixes bug #542777 and was partially based on a patch there
from Peter Clifton.

14 years agowin32: Add gdk_win32_window_get_impl_hwnd
Alexander Larsson [Fri, 28 Oct 2011 09:05:53 +0000 (11:05 +0200)]
win32: Add gdk_win32_window_get_impl_hwnd

This is needed to fix the ms-windows theme not to create
native windows for all child windows.

14 years agowin32: Actually check for IPrintDialogCallback in configure
Morten Welinder [Fri, 28 Oct 2011 07:10:40 +0000 (09:10 +0200)]
win32: Actually check for IPrintDialogCallback in configure

14 years agowin32: Fix modal_hint handling
Alexander Larsson [Thu, 27 Oct 2011 20:13:54 +0000 (22:13 +0200)]
win32: Fix modal_hint handling

Modal hints are not really a stack. All windows that are modal
are allowed to get input, not just the top one.

This fixes bug #604156

14 years agowin32: Don't use API_CALL for SetWindowLong
Alexander Larsson [Thu, 27 Oct 2011 15:16:46 +0000 (17:16 +0200)]
win32: Don't use API_CALL for SetWindowLong

This can return 0 without it being an error.
Should fix the last issue with bug #142874

14 years agowin32: Make flush/sync work like in X
Alexander Larsson [Thu, 27 Oct 2011 14:56:40 +0000 (16:56 +0200)]
win32: Make flush/sync work like in X

gdk_flush() should gdk_display_sync() on all open displays.

Both for display_flush and display_sync it seems useful to call
GdiFlush, but we don't have anything extra to do for display_sync,
as there is no inherent roundtrip on win32.

This should close bug #84314

14 years agowin32: Add custom placements for some window types
Alexander Larsson [Thu, 27 Oct 2011 14:09:42 +0000 (16:09 +0200)]
win32: Add custom placements for some window types

Windows with transients: center on parent
Splash screens: center on monitor
Also properly ignores initial moves of unmapped
windows that are not override redirect or HINT_POS

Fixes bugs #324254 and #612359

14 years agowin32: More robust way to ensure we get a configure event after move/resize
Alexander Larsson [Thu, 27 Oct 2011 08:42:07 +0000 (10:42 +0200)]
win32: More robust way to ensure we get a configure event after move/resize

There were still cases where we didn't get a WINDOWPOSCHANGED after
a SetWindowPos() call, like e.g. with a larger minimum size than
the set size (bug #574935)

So, we revert the previous fix and now just always manually emit
a configure notify after the move_resize call. Also, we inhibit
the WINDOWPOSCHANGED configure event during the move_resize operation
to avoid multiple Configures.

14 years agowin32: Ensure we always send a configure event when changing size/pos
Alexander Larsson [Wed, 26 Oct 2011 19:46:19 +0000 (21:46 +0200)]
win32: Ensure we always send a configure event when changing size/pos

There are some cases where we don't get a WINDOWPOSCHANGE such that
we generate a configure event, even if we called gdk_window_move_resize()
or similar. For instance:
* The window is fullscreen
* The window is maximized
* The specified pos/size is the same as the current one

However, as per X11 ConfigureNotify semantics we *always* want one, or
we could run into issue like e.g. bug #537296 where we're waiting for
the CONFIGURE to call gdk_window_thaw_toplevel_updates_libgtk_only().

14 years agowin32: By default, allow windows larger than the screen
Alexander Larsson [Wed, 26 Oct 2011 19:44:49 +0000 (21:44 +0200)]
win32: By default, allow windows larger than the screen

14 years agowin32: Fix size or style changes during fullscreen
Alexander Larsson [Wed, 26 Oct 2011 10:43:24 +0000 (12:43 +0200)]
win32: Fix size or style changes during fullscreen

When we're fullscreen we should update the cached hints, and we
should not apply the normal hints to the style.

This fixes bug #516822

14 years agowin32: Use WM_NCDESTROY instead of WM_DESTROY
Alexander Larsson [Wed, 26 Oct 2011 09:41:35 +0000 (11:41 +0200)]
win32: Use WM_NCDESTROY instead of WM_DESTROY

WM_NCDESTROY gets called after children are destroyed, which is
the semantics DestroyNotify has in X11.

14 years agowin32: Don't remove the window from the handle table on destroy
Alexander Larsson [Wed, 26 Oct 2011 09:39:15 +0000 (11:39 +0200)]
win32: Don't remove the window from the handle table on destroy

We always get the WM_DESTROY message anyway, and we remove it there.
Bug #336416 even claims this could be a leak if the WM_DESTROY
message was not seen before the DestroyWindow call returned, as
the WM_DESTROY message could not be handled later without the
window in the handle table. I'm not sure this can happen, but we
might as well remove it.

14 years agowin32: Make set_keep_above work also for non-mapped windows
Alexander Larsson [Wed, 26 Oct 2011 09:08:33 +0000 (11:08 +0200)]
win32: Make set_keep_above work also for non-mapped windows

This fixes bug #171456

14 years agowin32: Send window-state-changes before configure events
Alexander Larsson [Wed, 26 Oct 2011 08:21:10 +0000 (10:21 +0200)]
win32: Send window-state-changes before configure events

This is requires to that the state of the window is right when
you get the configure event (and to match what X does).

Fixes bug #169811

14 years agowin32: Send initial configure
Alexander Larsson [Tue, 25 Oct 2011 14:39:42 +0000 (16:39 +0200)]
win32: Send initial configure

We need to send a configure event when a window is shown.

14 years agowin32: Ignore client requested window move/size during SIZEMOVE
Alexander Larsson [Tue, 25 Oct 2011 14:13:47 +0000 (16:13 +0200)]
win32: Ignore client requested window move/size during SIZEMOVE

This will just be fighting the user like in e.g.
https://bugzilla.gnome.org/show_bug.cgi?id=64428

14 years agowin32: Remove most special casing of WINPOSCHANGED during modal ops
Alexander Larsson [Tue, 25 Oct 2011 13:36:13 +0000 (15:36 +0200)]
win32: Remove most special casing of WINPOSCHANGED during modal ops

There is no particular reason to special case this, we want to handle all
sort of normal events. The only special thing we keep is that
as an optimization we pump the message loop extra during a WINPOSCHANGED
in a modal operation as that will cause us to repaint faster.

Also, bump the arbitrary number of mainloop iterations for the timer.
I don't see why we need it at all, but at least doing more than one
iteration if needed should be nice.

14 years agowin32: Fix missed resize exit message
Alexander Larsson [Tue, 25 Oct 2011 13:34:22 +0000 (15:34 +0200)]
win32: Fix missed resize exit message

When you start a window resize or move via the window menu and
don't actually change anything we're not getting an exitsizemove.
In order to work around this we also look for WM_CAPTURECHANGED.

14 years agowin32: Handle all window changes in WINDOWPOSCHANGED
Alexander Larsson [Tue, 25 Oct 2011 12:38:16 +0000 (14:38 +0200)]
win32: Handle all window changes in WINDOWPOSCHANGED

This moves all the code from WM_SIZE, WM_MOVE, and WM_SHOWWINDOW into
one place, cleans up the code and makes sure we only send a single
configure event even if both size and position changes.

14 years agowin32: Fix up window_show
Alexander Larsson [Tue, 25 Oct 2011 12:26:22 +0000 (14:26 +0200)]
win32: Fix up window_show

We don't pass in raise anymore, but already_mapped.
Also, already_mapped must be used rather than MAPPED, as we already
synthesize the MAPPED in the generic code (and thus we don't have
to synthesize it again).

14 years agowin32: correctly handle difference between tab_pos and gap_side when drawing an exten...
Dieter Verfaillie [Thu, 20 Oct 2011 15:09:31 +0000 (17:09 +0200)]
win32: correctly handle difference between tab_pos and gap_side when drawing an extension (notebook tab)

14 years agowin32: add TODO mentioning GtkButton::child-displacement-x & y should be 0 when XP...
Dieter Verfaillie [Thu, 20 Oct 2011 12:03:31 +0000 (14:03 +0200)]
win32: add TODO mentioning GtkButton::child-displacement-x & y should be 0 when XP theme is active

14 years agowin32: fix typo in msw_style.c
Arnaud Charlet [Thu, 20 Oct 2011 11:18:19 +0000 (13:18 +0200)]
win32: fix typo in msw_style.c

https://bugzilla.gnome.org/show_bug.cgi?id=647460

14 years agowin32: Call GetQueueStatus instead of PeekMessage PM_NOREMOVE
Dieter Verfaillie [Fri, 21 Oct 2011 09:38:31 +0000 (11:38 +0200)]
win32: Call GetQueueStatus instead of PeekMessage PM_NOREMOVE

Calling PeekMessage can cause reentrant calls into the window procedure
for sent (as opposed to posted) messages, so its not safe to call
when we're not expecting reentrancy. Instead we call GetQueueStatus
when we're just looking for availible messages.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=552041

14 years agowin32: Better crossing events and grab destination reporting
Alexander Larsson [Wed, 19 Oct 2011 19:44:38 +0000 (21:44 +0200)]
win32: Better crossing events and grab destination reporting

We new report to the right window during !owner_event grabs, and
we send proper enter and leave events.

14 years agowin32: Record the native event mask in use
Alexander Larsson [Wed, 19 Oct 2011 19:36:41 +0000 (21:36 +0200)]
win32: Record the native event mask in use

14 years agowin32: Use right native_window for implicit grabs
Alexander Larsson [Wed, 19 Oct 2011 19:35:04 +0000 (21:35 +0200)]
win32: Use right native_window for implicit grabs

The native grab really is on the window that got the button press event.

14 years agowin32: in window_at_pointer, ensure that we handle non-client areas correctly
Alexander Larsson [Wed, 19 Oct 2011 14:15:17 +0000 (16:15 +0200)]
win32: in window_at_pointer, ensure that we handle non-client areas correctly

We should not return a window if the pointer is in the non-client area,
like the titlebar.

14 years agowin32: Handle implicit grabs
Alexander Larsson [Tue, 18 Oct 2011 14:52:41 +0000 (16:52 +0200)]
win32: Handle implicit grabs

14 years agowin32: Update input device code to use the new property names in constructor
Alexander Larsson [Mon, 7 Nov 2011 15:49:09 +0000 (16:49 +0100)]
win32: Update input device code to use the new property names in constructor

14 years agowin32: Fix up initialization order of input subsystem
Alexander Larsson [Mon, 7 Nov 2011 15:48:29 +0000 (16:48 +0100)]
win32: Fix up initialization order of input subsystem

We were getting warnings due to windows being created before input
subsystems were fully initialized.

14 years agowin32: Fix DnD when drag icon is below the pointer
Dieter Verfaillie [Mon, 19 Sep 2011 13:42:19 +0000 (15:42 +0200)]
win32: Fix DnD when drag icon is below the pointer

By reverting gdk_drag_find_window_for_screen logic to what it was
before eb21a7df290936223f6a80cef36b52a8c68a1d22.
The old logic knew how to ignore drag_window when searching
for dest_window, but that code was removed (I guess by accident).

https://bugzilla.gnome.org/show_bug.cgi?id=616544

14 years agowin32: dnd should not be registerd for offscreen windows
Dieter Verfaillie [Tue, 27 Sep 2011 19:53:48 +0000 (21:53 +0200)]
win32: dnd should not be registerd for offscreen windows

https://bugzilla.gnome.org/show_bug.cgi?id=616544

14 years agoWin32: Fix _gdk_windowing_window_at_pointer to correctly return a toplevel
Peter Clifton [Sat, 10 Sep 2011 15:30:56 +0000 (16:30 +0100)]
Win32: Fix _gdk_windowing_window_at_pointer to correctly return a toplevel

Commit 5ebb32d1ffa23241d562fb4d5be02bc6f156b515 didn't add the correct
code to find the toplevel window. The WindowFromPoint() function does
not return the toplevel window in the hierarchy, it returns the deepest
non-disabled, non-invisible child. As we don't use invisible or disabled
windows, we don't actually need to use the ChildWindowFromPoint walk for
the non get_toplevel case, so we can remove that code path.

To find a toplevel, we need to start from the desktop and work up, using
ChildWindowFromPointEx (to ignore invisible and disabled windows). If we
don't ignore invisible and disabled windows (as is the case with the
ChildWindowFromPoint call, we are liable to get returns of hidden or
disabled children of the desktop which don't belong to us, but notionally
occupy the same area under the pointer.

An alternative might be to start our walk with one of the children of the
desktop owned by our process and thread - which we can enumerate using,
the EnumThreadWindows call, or (presumably) determine internally. This
would not work when we are inside a GtkSocket though, as the children of
the desktop would belong to the process owning the GtkPlug - we would
have to rely on our own list of windows.

For correctness, this commit adds tests to ensure that we don't try to
return either x or y window coordinates if that corresponding pointer is
NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=658842

14 years agoWin32: Ensure native back-end for windows where the user requests their handle
Peter Clifton [Fri, 9 Sep 2011 14:17:29 +0000 (15:17 +0100)]
Win32: Ensure native back-end for windows where the user requests their handle

https://bugzilla.gnome.org/show_bug.cgi?id=658841

14 years agoAdd G_ENABLE_DEBUG #ifdef check in gdkdisplay-win32.c
Chun-wei Fan [Thu, 16 Jun 2011 05:48:56 +0000 (13:48 +0800)]
Add G_ENABLE_DEBUG #ifdef check in gdkdisplay-win32.c

Commit 88707e6912c376faedf0b8c5b02895aa18473cb4 used
_gdk_win32_cf_to_string, which is only defined when G_ENABLE_DEBUG
is defined, so add G_ENABLE_DEBUG #ifdef around that part.

14 years agowin32: resurect Windows clipboard selection notification
Marc-André Lureau [Thu, 9 Jun 2011 18:45:20 +0000 (20:45 +0200)]
win32: resurect Windows clipboard selection notification

This is a rewrite of e6fa7394baa8a7cb80ae01a0c81729717019172b, with
misc fixes that should help with some bugs Tim was talking about.

https://bugzilla.gnome.org/show_bug.cgi?id=652239

14 years agowin32: Resurrect some enter/leave notify events for native windows
Hans Breuer [Fri, 27 Aug 2010 19:29:33 +0000 (21:29 +0200)]
win32: Resurrect some enter/leave notify events for native windows

The button highlighting in testgtk works again, even with
GDK_NATIVE_WINDOWS. Unfortunately testgtk:menus still does
not work for the forced-native-window-case.

14 years agowin32: Never pass SWP_NOSIZE or SWP_NOMOVE to SetWindowPos
Neil Roberts [Thu, 26 Aug 2010 18:02:00 +0000 (19:02 +0100)]
win32: Never pass SWP_NOSIZE or SWP_NOMOVE to SetWindowPos

In _gdk_window_move_resize_child it tries to decide whether to pass
SWP_NOSIZE and SWP_NOMOVE based on whether the new size and position
is different from the window's existing position. However it seems
that GDK now ends up updating the window's position before calling
_gdk_window_move_resize_child so this would mean it would think the
window never changes size or position so SWP_NOSIZE|SWP_NOMOVE would
always be set. This causes child windows to never be resized.

This patch changes it so that it never passes either flag to
SetWindowPos. I don't know whether this will cause any side effects
but you'd think it shouldn't do any harm to reassert the current size.

https://bugzilla.gnome.org/show_bug.cgi?id=628049

Signed-off-by: Hans Breuer <hans@breuer.org>
14 years agoFix build by adding include
Alexander Larsson [Thu, 10 Nov 2011 16:39:33 +0000 (17:39 +0100)]
Fix build by adding include

build failed with a GTK_IS_VIEWPORT link error

14 years agoAdd include to fix the build
Alexander Larsson [Thu, 10 Nov 2011 16:24:22 +0000 (17:24 +0100)]
Add include to fix the build

14 years agoa11y: Get rid of gtk.h includes in headers
Benjamin Otte [Thu, 10 Nov 2011 16:03:10 +0000 (17:03 +0100)]
a11y: Get rid of gtk.h includes in headers

This way, we can include them without accidentally including deprecated
code. Which means we can still use the recently added turning-off tricks
for deprecation warnings.

14 years agoa11y: Fix gcc warning
Benjamin Otte [Thu, 10 Nov 2011 15:52:44 +0000 (16:52 +0100)]
a11y: Fix gcc warning

14 years agoa11y: It's not a bug if there's no row at some point
Benjamin Otte [Thu, 10 Nov 2011 14:01:21 +0000 (15:01 +0100)]
a11y: It's not a bug if there's no row at some point

In that case, there's just nothing there.

14 years agogtk: Fix parsing of accelerators with keycodes
Bastien Nocera [Thu, 10 Nov 2011 10:59:44 +0000 (10:59 +0000)]
gtk: Fix parsing of accelerators with keycodes

GDK_KEY_VoidSymbol is not the same as keycode 0. This fixes
keycodes such as "0xb3" being parsed as "VoidSymbol" keysyms.

https://bugzilla.gnome.org/show_bug.cgi?id=663761

14 years agogtk: Fix GtkCellRenderer ignoring keycodes
Bastien Nocera [Thu, 10 Nov 2011 10:58:37 +0000 (10:58 +0000)]
gtk: Fix GtkCellRenderer ignoring keycodes

We should use the new helper code rather than invent our own
functions again.

https://bugzilla.gnome.org/show_bug.cgi?id=663761

14 years agogtktreeviewaccessible: use a value_destroy_func with the cell_info_by_index hash
Guillaume Desmottes [Wed, 9 Nov 2011 13:32:32 +0000 (14:32 +0100)]
gtktreeviewaccessible: use a value_destroy_func with the cell_info_by_index hash

This ensures that we don't leak any GtkTreeViewAccessibleCellInfo when
re-inserting a new one with the same key.

https://bugzilla.gnome.org/show_bug.cgi?id=663694

14 years agogtktreeviewaccessible: factor out cell_info_free()
Guillaume Desmottes [Wed, 9 Nov 2011 13:31:43 +0000 (14:31 +0100)]
gtktreeviewaccessible: factor out cell_info_free()

https://bugzilla.gnome.org/show_bug.cgi?id=663694

14 years agobroadway: Initial support fro V7+ websockets
Michael Meeks [Thu, 10 Nov 2011 09:12:28 +0000 (10:12 +0100)]
broadway: Initial support fro V7+ websockets

Allows more modern browsers eg. firefox 5+ to use gtk/broadway
Auto-detects protocol version, and can switch between them at
as you connect a different browser.

This works to some extent, but seems to hang sometimes, for
instance the "button box" test in testgtk never shows up.

14 years agouimanager: Work around deprecations
Matthias Clasen [Thu, 10 Nov 2011 04:45:58 +0000 (23:45 -0500)]
uimanager: Work around deprecations

14 years agotreeview: Work around deprecations
Matthias Clasen [Thu, 10 Nov 2011 04:42:11 +0000 (23:42 -0500)]
treeview: Work around deprecations

14 years agoRemove some redundant verbosity
Matthias Clasen [Thu, 10 Nov 2011 03:18:39 +0000 (22:18 -0500)]
Remove some redundant verbosity

14 years agoDon't use G_ERRORCHECK_MUTEXES anymore
Matthias Clasen [Thu, 10 Nov 2011 03:11:04 +0000 (22:11 -0500)]
Don't use G_ERRORCHECK_MUTEXES anymore

It's gone from GLib.

14 years agoUpdate documentation around deprecations.
Matthias Clasen [Thu, 10 Nov 2011 03:08:43 +0000 (22:08 -0500)]
Update documentation around deprecations.

14 years agoDon't add -DGSEAL_ENABLE to CFLAGS anymore
Matthias Clasen [Thu, 10 Nov 2011 03:05:11 +0000 (22:05 -0500)]
Don't add -DGSEAL_ENABLE to CFLAGS anymore

That define is no longer used anywhere in gtk.

14 years agoAdd a missing include
Matthias Clasen [Thu, 10 Nov 2011 03:03:10 +0000 (22:03 -0500)]
Add a missing include

14 years agoDrop use of GDK_DISABLE_DEPRECATED guards in gtk
Matthias Clasen [Thu, 10 Nov 2011 03:02:42 +0000 (22:02 -0500)]
Drop use of GDK_DISABLE_DEPRECATED guards in gtk

We now use function attributes for deprecation so the build-breaking
guards are no longer needed.

14 years agoDrop use of GDK_DISABLE_DEPRECATED guards in gdk
Matthias Clasen [Thu, 10 Nov 2011 03:01:00 +0000 (22:01 -0500)]
Drop use of GDK_DISABLE_DEPRECATED guards in gdk

We now use function attributes for deprecation so the build-breaking
guards are no longer needed.

14 years agoDrop references to g_thread_init()
Matthias Clasen [Wed, 9 Nov 2011 23:32:21 +0000 (18:32 -0500)]
Drop references to g_thread_init()

We are already requiring GLib 2.31, so g_thread_init() is never
needed anymore.

14 years agoBug 661997 - Gtk crashes when changing the TreeView model while ...
Kristian Rietveld [Wed, 9 Nov 2011 07:44:28 +0000 (08:44 +0100)]
Bug 661997 - Gtk crashes when changing the TreeView model while ...

Simply stopping rubber banding in gtk_tree_view_set_model() eliminates
the crash.  Reported by Thomas Perl.

14 years agoDon't implement GApplication mainloop
Ryan Lortie [Wed, 14 Sep 2011 02:47:30 +0000 (22:47 -0400)]
Don't implement GApplication mainloop

Let the default GApplication implementation take care of it.

https://bugzilla.gnome.org/show_bug.cgi?id=658805

14 years agodemos: Remove non-working code
Benjamin Otte [Wed, 9 Nov 2011 02:46:23 +0000 (03:46 +0100)]
demos: Remove non-working code

It causes warnings, so it has to go.
The cursor doesn't change anyway, no matter if it's there or not.

14 years agotools: Work with deprecated APIs
Benjamin Otte [Wed, 9 Nov 2011 02:22:19 +0000 (03:22 +0100)]
tools: Work with deprecated APIs

We want to screenshot deprecated widgets, so we'd better not fail when
using them.

14 years agoexanmples: Don't use deprecated API
Benjamin Otte [Wed, 9 Nov 2011 02:20:22 +0000 (03:20 +0100)]
exanmples: Don't use deprecated API

14 years agotestgtk: Remove deprecations from shapes test
Benjamin Otte [Wed, 9 Nov 2011 02:15:27 +0000 (03:15 +0100)]
testgtk: Remove deprecations from shapes test

14 years agotestgtk: Don't use deprecated functions in properties example
Benjamin Otte [Wed, 9 Nov 2011 02:13:43 +0000 (03:13 +0100)]
testgtk: Don't use deprecated functions in properties example

14 years agotreeview: Do a simple replace for gdk_window_get_pointer()
Benjamin Otte [Wed, 9 Nov 2011 01:52:50 +0000 (02:52 +0100)]
treeview: Do a simple replace for gdk_window_get_pointer()

Replace it with the equivalent gdk_window_get_device_position() with the
core pointer.

14 years agogtk-demo: Remove excessive pointer querying
Benjamin Otte [Wed, 9 Nov 2011 01:52:09 +0000 (02:52 +0100)]
gtk-demo: Remove excessive pointer querying

14 years agoqueryimmodules: Actually fix deprecation warnings
Benjamin Otte [Tue, 8 Nov 2011 21:18:32 +0000 (22:18 +0100)]
queryimmodules: Actually fix deprecation warnings

The previous patch still caused warnings. Ooops. That's what you get for
not compiling with -Werror.

14 years agoquartz: include all buttons' state in GdkEventMotion.state
Michael Natterer [Tue, 8 Nov 2011 23:34:45 +0000 (00:34 +0100)]
quartz: include all buttons' state in GdkEventMotion.state
(cherry picked from commit 3b5c5710daa337b61c9e2135e3e55c380e5bc991)

14 years agoquartz: include all buttons' states in GdkEventButton.state
Michael Natterer [Tue, 8 Nov 2011 23:25:01 +0000 (00:25 +0100)]
quartz: include all buttons' states in GdkEventButton.state
(cherry picked from commit a381e8ea62441b6715ba9bcb0e04332fd914f8b1)